#ifndef ALFS_LANGUAGE_SUPPORT_DETAIL_EXTENSION_OF_BOOST_TYPE_TRAITS_INTRINSICS_HPP
#define ALFS_LANGUAGE_SUPPORT_DETAIL_EXTENSION_OF_BOOST_TYPE_TRAITS_INTRINSICS_HPP

#define ALFS_BOOST_TYPETRAITS_INTRINSICS_PATCH

// File [alfs/language_support/detail/extension_of_boost_type_traits_intrinsics.hpp].
//
// (c) copyright Alf P. Steinbach 2008.
// Use, modification and distribution are subject to the "New BSD License"
// as listed at <url: http://www.opensource.org/licenses/bsd-license.php>.

// NOTE: DO NOT INCLUDE THIS FILE DIRECTLY ANYWHERE.
// Include it indirectly by including e.g. Boost type traits.

// NOTE: INTRUSIVE EXTENSION OF BOOST LIBRARY HEADER
// Add the following in the middle of <boost/type_traits/intrinsics.hpp>, just before
// the default as-"false" definitions of still undefined type trait macros:
//
//#ifdef  ALFS_USE_BOOST_TYPETRAITS_INTRINSICS_PATCH
//#include    <alfs/language_support/detail/extension_of_boost_type_traits_intrinsics.hpp>
//#endif


#include    <alfs/language_support/Bool3Enum.hpp>

namespace alfs{

    template< typename T > struct IsUnion
#ifdef BOOST_IS_UNION
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_IS_UNION(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct IsPOD
#ifdef BOOST_IS_POD
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_IS_POD(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct IsEmpty
#ifdef BOOST_IS_EMPTY
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_IS_EMPTY(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasTrivialConstructor
#ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasTrivialCopy
#ifdef BOOST_HAS_TRIVIAL_COPY
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_TRIVIAL_COPY(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasTrivialAssign
#ifdef BOOST_HAS_TRIVIAL_ASSIGN
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_TRIVIAL_ASSIGN(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasTrivialDestructor
#ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_TRIVIAL_DESTRUCTOR(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasNothrowConstructor
#ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_NOTHROW_CONSTRUCTOR(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasNothrowCopy
#ifdef BOOST_HAS_NOTHROW_COPY
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_NOTHROW_COPY(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasNothrowAssign
#ifdef BOOST_HAS_NOTHROW_ASSIGN
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_NOTHROW_ASSIGN(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

    template< typename T > struct HasVirtualDestructor
#ifdef BOOST_HAS_VIRTUAL_DESTRUCTOR
    { static Bool3::Enum const value = Bool3::FromBool<BOOST_HAS_VIRTUAL_DESTRUCTOR(T)>::value; };
#else
    { static Bool3::Enum const value = Bool3::maybe; };
#endif

}  // alfs


#endif
